<%@ Page language="c#" Codebehind="Wizard.aspx.cs" AutoEventWireup="True" Inherits="CrossFactory.Suite.WWW.Controls.Wizard.WizardControl" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>
			<%= pageResourceManager.GetString("title")%>
		</title>
		<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
		<meta name="CODE_LANGUAGE" Content="C#">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
		<LINK href="StyleSheets/Wizard.css" type="text/css" rel="stylesheet">
		<script language="javascript" src="Scripts/Wizard.js">
		</script>
		<script language="javascript">
			var wizard = new Wizard('<%= Context.Items["CMFilesDirectory"] %>','<%= Context.Items["UserLanguage"] %>','<%= Application["applicationPath"] %>');
			var closing = false;

			function WizardResult(returnValue)
			{
				this.returnValue = returnValue;
				this.result = null;
			}
						
			function LoadWizard()
			{
				var curWidth;
				var curHeight;

				window.returnValue = new WizardResult(false);
				if (wizard.LoadWizard('<%= WizardName %>'))
				{
					wizard.AddParameters(window.dialogArguments);
					wizard.ShowSteps();
					wizard.ShowFields();
					wizard.CheckChanges();
					wizard.SetFocus();

					curWidth = parseInt(window.dialogWidth);
					curWidth = curWidth + document.body.firstChild.offsetWidth - document.body.clientWidth;
					
					if (curWidth > parseInt(window.dialogWidth))
					{
						window.dialogWidth = curWidth + 'px';
					}

					curHeight = parseInt(window.dialogHeight);
					curHeight = curHeight + document.body.firstChild.offsetHeight - document.body.clientHeight;
					if (curHeight > parseInt(window.dialogHeight))
					{
						window.dialogHeight = curHeight + 'px';
					}

					curWidth = parseInt(window.dialogWidth);
					curWidth = curWidth + document.body.firstChild.offsetWidth - document.body.clientWidth;
					
					if (curWidth > parseInt(window.dialogWidth))
					{
						window.dialogWidth = curWidth + 'px';
					}

					curHeight = parseInt(window.dialogHeight);
					curHeight = curHeight + document.body.firstChild.offsetHeight - document.body.clientHeight;
					if (curHeight > parseInt(window.dialogHeight))
					{
						window.dialogHeight = curHeight + 'px';
					}
				}
			}
			
			function MovePrevious()
			{
				wizard.MovePrevious();

				curWidth = parseInt(window.dialogWidth);
				curWidth = curWidth + document.body.firstChild.offsetWidth - document.body.clientWidth;
				window.dialogWidth = curWidth + 'px';
				curHeight = parseInt(window.dialogHeight);
				curHeight = curHeight + document.body.firstChild.offsetHeight - document.body.clientHeight;
				window.dialogHeight = curHeight + 'px';

				curWidth = parseInt(window.dialogWidth);
				curWidth = curWidth + document.body.firstChild.offsetWidth - document.body.clientWidth;
				window.dialogWidth = curWidth + 'px';
				curHeight = parseInt(window.dialogHeight);
				curHeight = curHeight + document.body.firstChild.offsetHeight - document.body.clientHeight;
				window.dialogHeight = curHeight + 'px';
			}
			
			function MoveNext()
			{
				wizard.MoveNext();

				curWidth = parseInt(window.dialogWidth);
				curWidth = curWidth + document.body.firstChild.offsetWidth - document.body.clientWidth;
				window.dialogWidth = curWidth + 'px';
				curHeight = parseInt(window.dialogHeight);
				curHeight = curHeight + document.body.firstChild.offsetHeight - document.body.clientHeight;
				window.dialogHeight = curHeight + 'px';

				curWidth = parseInt(window.dialogWidth);
				curWidth = curWidth + document.body.firstChild.offsetWidth - document.body.clientWidth;
				window.dialogWidth = curWidth + 'px';
				curHeight = parseInt(window.dialogHeight);
				curHeight = curHeight + document.body.firstChild.offsetHeight - document.body.clientHeight;
				window.dialogHeight = curHeight + 'px';
			}
			
			function Finish()
			{
				wizard.Finish();

				curWidth = parseInt(window.dialogWidth);
				curWidth = curWidth + document.body.firstChild.offsetWidth - document.body.clientWidth;
				window.dialogWidth = curWidth + 'px';
				curHeight = parseInt(window.dialogHeight);
				curHeight = curHeight + document.body.firstChild.offsetHeight - document.body.clientHeight;
				window.dialogHeight = curHeight + 'px';

				curWidth = parseInt(window.dialogWidth);
				curWidth = curWidth + document.body.firstChild.offsetWidth - document.body.clientWidth;
				window.dialogWidth = curWidth + 'px';
				curHeight = parseInt(window.dialogHeight);
				curHeight = curHeight + document.body.firstChild.offsetHeight - document.body.clientHeight;
				window.dialogHeight = curHeight + 'px';
			}
			
			function Finish2()
			{
				wizard.Finish2();

				curWidth = parseInt(window.dialogWidth);
				curWidth = curWidth + document.body.firstChild.offsetWidth - document.body.clientWidth;
				window.dialogWidth = curWidth + 'px';
				curHeight = parseInt(window.dialogHeight);
				curHeight = curHeight + document.body.firstChild.offsetHeight - document.body.clientHeight;
				window.dialogHeight = curHeight + 'px';

				curWidth = parseInt(window.dialogWidth);
				curWidth = curWidth + document.body.firstChild.offsetWidth - document.body.clientWidth;
				window.dialogWidth = curWidth + 'px';
				curHeight = parseInt(window.dialogHeight);
				curHeight = curHeight + document.body.firstChild.offsetHeight - document.body.clientHeight;
				window.dialogHeight = curHeight + 'px';
			}

			function Finish3()
			{
				wizard.Finish3();

				curWidth = parseInt(window.dialogWidth);
				curWidth = curWidth + document.body.firstChild.offsetWidth - document.body.clientWidth;
				window.dialogWidth = curWidth + 'px';
				curHeight = parseInt(window.dialogHeight);
				curHeight = curHeight + document.body.firstChild.offsetHeight - document.body.clientHeight;
				window.dialogHeight = curHeight + 'px';

				curWidth = parseInt(window.dialogWidth);
				curWidth = curWidth + document.body.firstChild.offsetWidth - document.body.clientWidth;
				window.dialogWidth = curWidth + 'px';
				curHeight = parseInt(window.dialogHeight);
				curHeight = curHeight + document.body.firstChild.offsetHeight - document.body.clientHeight;
				window.dialogHeight = curHeight + 'px';
			}

			function ActionChecked(fieldName)
			{
				wizard.ActionChecked(fieldName);
			}

			function SelectNodeActions( fieldName)
			{
				wizard.SelectNodeActions(fieldName);
			}
			
			function ShowAllActions(id, objImg)
			{
				wizard.ShowAllActions(id, objImg);
			}

			function ShowPageSelector()
			{
				wizard.ShowPageSelector();
			}
			
			function ValidateCaracters()
			{
				wizard.ValidateCaracters();
			}
			
			function CheckChanges()
			{
				wizard.CheckChanges();
			}
			
			function Cancel()
			{
				if (wizard.complete)
				{
					window.returnValue = new WizardResult(true);
					window.returnValue.result = wizard.result;
				}
				else
				{
					if (!closing)
					{
						closing = true;
						window.returnValue = new WizardResult(false);
						window.close();
					}
				}
			}
			
			function Close()
			{
				if (wizard.complete)
				{
					window.returnValue = new WizardResult(true);
					window.returnValue.result = wizard.result;
				}
				else
				{
					window.returnValue = new WizardResult(false);
				}
				closing = true;
				window.close();
			}
		</script>
	</HEAD>
	<body onload="LoadWizard()" onunload="Cancel();">
		<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
			<tr height="100%">
				<td>
					<table border="0" cellpadding="0" cellspacing="0" height="100%">
						<tr>
							<td colspan="2" align="left" background="Images/Layout/TopBackground.gif"><img src="Images/Layout/TopLeft.gif" width="154" height="19"></td>
						</tr>
						<tr>
							<td width="7" background="Images/Layout/LeftBackground.gif"><img src="Images/transp.gif" width="7" height="70"></td>
							<td width="100%" height="100%" id="WizardPath">
							</td>
						</tr>
					</table>
				</td>
				<td width="100%" valign="top" height="100">
					<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
						<tr>
							<td align="right" colspan="2" width="100%" height="32" background="Images/Layout/TopBackground.gif"><img src="Images/Layout/logo.gif" width="165" height="32"></td>
						</tr>
						<tr>
							<td width="100%" id="WizardContent" valign="top" style="PADDING-RIGHT:5px;PADDING-LEFT:5px;PADDING-BOTTOM:0px;PADDING-TOP:0px">
							</td>
							<td background="Images/Layout/RightBackground.gif" width="11"><img src="Images/transp.gif" width="11" height="1"></td>
						</tr>
					</table>
				</td>
			</tr>
			<tr height="40">
				<td colspan="2">
					<table border="0" cellpadding="0" cellspacing="0" height="100%">
						<tr>
							<td height="8"><img src="Images/Layout/FooterLeft.gif"></td>
							<td width="100%">
								<table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%">
									<tr>
										<td width="100%" background="Images/Layout/FooterCenter.gif" height="8"></td>
										<td height="8"><img src="Images/Layout/FooterRight.gif" width="255" height="8"></td>
									</tr>
								</table>
							</td>
						</tr>
						<tr>
							<td align="right" width="100%" colSpan="3">
								<table width="100%" height="100%" border="0" style="BACKGROUND :url(Images/Layout/Footer.gif) no-repeat right 50%">
									<tr>
										<td width="100%"></td>
										<td id="cellPrevious" style="DISPLAY:none"><input type="button" id="previousButton" value='<%= pageResourceManager.GetString("previousButton")%>' style="WIDTH:100px" onclick="MovePrevious()"></td>
										<td id="cellNext" style="DISPLAY:none"><input type="button" id="nextButton" value='<%= pageResourceManager.GetString("nextButton")%>' style="WIDTH:100px" onclick="MoveNext()"></td>
										<td id="cellFinish" style="DISPLAY:none"><input type="button" id="finishButton" value='<%= pageResourceManager.GetString("finishButton")%>' style="WIDTH:100px" onclick="Finish()"></td>
										<td id="cellFinish2" style="DISPLAY:none"><input type="button" id="finishButton2" value='<%= pageResourceManager.GetString("finishButton")%>2' style="WIDTH:100px" onclick="Finish2()"></td>
										<td id="cellFinish3" style="DISPLAY:none"><input type="button" id="finishButton3" value='<%= pageResourceManager.GetString("finishButton")%>3' style="WIDTH:100px" onclick="Finish3()"></td>
										<td id="cellCancel"><input type="button" id="cancelButton" value='<%= pageResourceManager.GetString("cancelButton")%>' style="WIDTH:100px" onclick="Cancel()"></td>
										<td id="cellClose" style="DISPLAY:none"><input type="button" id="closeButton" value='<%= pageResourceManager.GetString("closeButton")%>' style="WIDTH:100px" onclick="Close()"></td>
										<td width="1"></td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	</body>
</HTML>
